﻿@{
    SelectList l = new SelectList(System.Configuration.ConfigurationManager.AppSettings["Languages"].Split(',').ToList(), SF.GetLangCode());

    string SkinDefault = System.Configuration.ConfigurationManager.AppSettings["SkinDefault"];
    if (Session["SkinSelectList"] != null) { SkinDefault = Session["SkinSelectList"] as string; }
    SelectList Skin = new SelectList(System.Configuration.ConfigurationManager.AppSettings["Skin"].Split(',').ToList(), SkinDefault);
}
@using (Html.BeginForm("ChangeLang", "Main"))
{
    @Html.DropDownList("LangSelectList", l, new { onChange = "LangSelectListonSelectedIndexChanged()" })
}
 | 
@using (Html.BeginForm("ChangeSkin", "Main"))
{
    @Html.DropDownList("SkinSelectList", Skin, new { onChange = "SkinSelectListonSelectedIndexChanged()" })
}
 | 
@Html.R(VirtualPath, "Welcome") @User.Identity.Name @Html.ActionLink(@Html.R(VirtualPath, "LogOut"), "LogOut", "Main")
<a class="tosite_link" href="@Url.Content("~/")">@Html.R(VirtualPath, "ToSite")</a>
<script type="text/javascript">
    function LangSelectListonSelectedIndexChanged() {
        document.forms[0].submit();
    }
    function SkinSelectListonSelectedIndexChanged() {
        document.forms[1].submit();
    }
</script>